<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Controller for managing dashboard.
 * @package backend-dashboard/conrollers
 * @category Controller
 * 
 * @author Mark Angelo Angulo
 * @copyright (c) 2015
 */
class Dashboard extends Backend_Controller {

    /**
     *  Constructor method.
     */
    function __construct()
    {
        parent::__construct();
//        $this->load->helper('mysql_parser');
        $this->load->helper('mysql_to_migration');
    }

    /**
     * Default method called when nothing is specified.
     * Displays dashboard.
     * @access public
     */
    public function index()
    {
        
//        echo urlencode( $this->encrypt->encode('299') );
//        echo '<br>';
//        echo $this->encrypt->decode( urldecode('tvl3j9sEYS3eUek%3D') );
//        exit;
        
        
        echo $x = $this->encrypt->url_encode('26');
        echo '<br>';
        echo $this->encrypt->url_decode($x);
        exit;
        
        
        
        $this->session->unset_userdata('preview_id');
        
        // active navigation
        $data['navigation'] = 'dashboard';

        // build breadcrumb
        $this->breadcrumb->clear();
        $this->breadcrumb->add_crumb('Dashboard');

        // build template
        $this->template
                ->title('Dashboard')
                ->set_layout('main')
                ->set_partial('navigation', 'layouts/navigation')
                ->set_partial('footer', 'layouts/footer')
                ->build('dashboard', $data);
        
    }
    
    public function sidebar()
    {
        // active navigation
        $data['navigation'] = 'dashboard';

        // build breadcrumb
        $this->breadcrumb->clear();
        $this->breadcrumb->add_crumb('Dashboard');

        // build template
        $this->template
                ->title('Dashboard')
                ->set_layout('main')
                ->set_partial('navigation', 'layouts/navigation')
                ->set_partial('footer', 'layouts/footer')
                ->build('sidebar', $data);
    }

}

/* End of file dashboard.php */
/* Location: ./application/modules/backend-dashboard/controllers/dashboard.php */